home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / mac / media / dirs / BackUp / code.cst / 00001_Script_cmr-roll next >
Text File  |  2002-10-15  |  2KB  |  97 lines

  1. property plain,rolled,clicked,state,flashstate,flashon,nextflash,blinkrate,mysprite,spritenum,ftime
  2. global ans,lastclicked,nome,godject
  3. on new me
  4.   mysprite=sprite(spritenum)
  5.   plain=mysprite.member.name
  6.   state=0
  7.   flashstate=0
  8.   flashon=0
  9.   nextflash=0
  10.   blinkrate=30
  11.   ftime=0
  12. end
  13.  
  14. on beginsprite me
  15.   if rolled="x" then rolled=plain&"hot"
  16.   if clicked="x" then clicked=plain
  17. end
  18.  
  19. on getpropertydescriptionlist me
  20.   set proplist=[#rolled:[#comment:"Name of rollover image",#format:#string,#default:"x"],#clicked:[#comment:"Name of clicked image",#format:#string,#default:"x"]]
  21.   return proplist
  22. end
  23.  
  24. on mouseenter me
  25.   if state<>1 then
  26.     state=1
  27.     mysprite.member=member rolled
  28.     updatestage
  29.   end if
  30.   pass
  31. end
  32.  
  33. on mousedown me
  34.   if not(soundbusy(1)) and not(soundbusy(2)) then
  35.     lastclicked=clicked
  36.   end if 
  37.   state=3
  38.   mysprite.member=member(clicked)
  39.   updatestage
  40.   pass
  41. end
  42.  
  43. on mouseleave me
  44.   if state then
  45.     state=0
  46.     mysprite.member=member(plain)
  47.     updatestage
  48.   end if
  49.   pass
  50. end
  51.  
  52. on flash me
  53.   if flashstate=0 then
  54.     mysprite.member=member(rolled)
  55.   else
  56.     mysprite.member=member(plain)
  57.   end if
  58.   flashstate=not(flashstate)
  59. end
  60.  
  61. on blink_on me,br,ft
  62.   if br.ilk=#integer then blinkrate=br
  63.   nextflash=the ticks+blinkrate
  64.   flashon=1
  65.   if ft.ilk=#integer then 
  66.     ftime=the ticks+ft
  67.   else
  68.     ftime=0
  69.   end if
  70. end
  71.  
  72. on blink_off me
  73.   mysprite.member=member(plain)
  74.   updatestage
  75.   flashon=0
  76. end
  77.  
  78. on exitframe me
  79.   if flashon then
  80.     if the ticks>nextflash then
  81.       flash(me)
  82.       nextflash=the ticks+blinkrate
  83.     end if
  84.     if the ticks>ftime and ftime<>0 then
  85.       ftime=0
  86.       blink_off(me)
  87.     end if
  88.   end if
  89. end
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.